package library.operation.impl;

import library.book.BookList;
import library.operation.IOperation;

/**
 * 下架书籍操作
 */
public class RemoveOperation implements IOperation {
    @Override
    public void work(BookList bookList) {
        System.out.println("此时您正在进行的是下架书籍操作~");
        System.out.println("请输入您要下架的书籍名称:");
        String booksName=scanner.next();

        if (bookList.isContains(booksName)){
            bookList.bookUpateOperate(booksName);
            System.out.println("书籍下架成功~~");
        }else {
            System.err.println("书籍不在图书馆中，无法下架~");
        }
    }
}
